<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@include file="/pageRc/common/common.jsp"%>

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta name="viewport" content="initial-scale=1.0,maximum-scale=1.0,user-scalable=no">
	<meta name="format-detection" content="telephone=no">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="mobile-web-app-capable" content="yes">
	<meta name="msapplication-tap-highlight" content="no">
	<script type="text/javascript" src="<%=commonPath %>/pageRc/js/jquery-1.9.1.min.js"></script> 
 　	<link rel="stylesheet" href="<%=commonPath %>/pageRc/layui/css/layui.css" media="all">
   	<link rel="stylesheet" href="<%=commonPath %>/res/css/global.css"> 
　　　<script type="text/javascript" src="<%=commonPath %>/pageRc/common/utils.js"></script>
	<script type="text/javascript" src="<%=commonPath %>/pageRc/common/msgTool.js"></script>
	<script type="text/javascript" src="<%=commonPath %>/pageRc/layui/layui.js"></script>　
	 
	<title>查看历史记录</title> 
	<script type="text/javascript">
	var path = "<%=commonPath%>";
	var msg =new msgTool();
 
	</script>
</head>

 <body >
 <div class="header">
  <blockquote class="layui-elem-quote">需求编号:${needInfor.needNo}    <br>需求名称:${needInfor.needName}</blockquote>   
 </div>
 <div style="layui-main"> 
           　  <ul class="fly-list fly-list-top">  
           <c:forEach items="${list}" var="need" > 
     			<li class="fly-list-li" style="height:60px">
	              <button class="layui-btn" onClick="deleteInfor('${need.rouid}')" ><i class="layui-icon">&#xe640;</i></button>
			           <h2 class="fly-tip"> 
		            <a href="">详情:${need.remark}</a>
		           </h2>
		          <p style="height:50px">
		            <span><a href="">消耗工时: ${need.needUseTime}</a></span>
		            <span>填报时间: ${need.happenDate}</span>
		            <span>阶段: ${need.stage}</span>
		            <c:if test="${need.reportState == '00'}">
		            	<span style="color: red;">审核状态: 未审核</span>
		            </c:if>
		            <c:if test="${need.reportState == '01'}">
		            	<span>审核状态: 审核通过</span>
		            </c:if>
		            <c:if test="${need.reportState == '02'}">
		            	<span style="color: red;">审核状态: 审核未通过</span>
		            </c:if>
		          </p>
	          </li>
 	       </c:forEach> 
    　　 </ul>    
</div>
		<script> 
		  layui.use(
				[ 'form', 'layer', 'laytpl', 'laypage','laydate' ],
				 function(){
					layer = layui.layer;
		 });
		  var size = "${size}";
		  function deleteInfor(rouid){ 
			  layer.confirm("确认删除该条报工记录?", {icon:3,title:"提示"},function(index){
				  msg.sendMsg("/page/base/"+rouid+"/deleteUserNeedInfor.do",{},function(data){ //新加的微信登录入口
						layer.alert("删除成功！");
				  		if(size=='1'){
							location.href ="<%=commonPath %>/page/base/dologin.do";
	 			  		}else{
							location.href ="<%=commonPath %>/page/base/searchHistoryInfor.do?needId=${needInfor.needId}&rouid=1";
	 			  		}
					});
			  }); 
		  }
</script>
</body>
</html>